package com.btl.component.st.support;

import cn.dev33.satoken.stp.StpLogic;

/**
 * StpLogic 门面类，管理项目中所有的 StpLogic 账号体系
 */
public class StpKit {

    /**
     * 会员端用户
     */
    public static final StpLogic ADMIN = new StpLogic(StpType.ADMIN);

    /**
     * 会员端用户
     */
    public static final StpLogic MEMBER = new StpLogic(StpType.MEMBER);

    /**
     * 终端用户
     */
    public static final StpLogic CLIENT = new StpLogic(StpType.CLIENT);


    /**
     * 获取当前登录客户端信息
     * @return ClientUserInfo
     */
    public static ClientUserInfo clientInfo() {
        return (ClientUserInfo) StpKit.CLIENT.getSession()
                .get("clientUserInfo");
    }


}
